var t = require("../common/index.js");
var app = getApp()
Component({
  properties: {
    data: {
      type: Object
    },
    floorIndex: {
      type: Number
    },
    columnCount: {
      type: Number
    },
    clickType: {
      type: Number
    }
  },
  data: { imgurl: app.getImgUrl() },
  methods: {
    goLink: function (e) {
      console.log('goLink',e)
      var o = e.currentTarget.dataset, i = o.item, a = i.id, r = o.positionIndex, s = o.timestamp, d = e.currentTarget.offsetTop;
      if(this.data.clickType == 0){
        this.triggerEvent("showqr",o)
      }else{
        if (a) {
            var p = this.data.floorIndex;
            (0, t.goLink)({
            type: "shop",
            data: { item: i,clickType:this.data.clickType },
            saOption: {
                componentName: "goodsList",
                floorIndex: p,
                positionIndex: r,
                timestamp: s,
                offsetTop: d
            }
            });
        }
      }
    }
  }
});